#include <iostream>

#include "managerview_console_impl.h"
#include "managerservice_impl.h"
#include "serviceview.h"
#include "serviceview_console_impl.h"
#include "managerview.h"
#include "tools.h"

using namespace std;

void show_menu(void)
{
	system("clear");
	cout<<"*****企业管理系统*****"<<endl;
	cout<<"1、超级管理员"<<endl;
	cout<<"2、业务管理员"<<endl;
	cout<<"0、退出"<<endl;
	cout<<"------------------"<<endl;
	cout<<"请选择您的业务选项:";
}

int main()
{
	init_id();
	ManagerView* manager_view = new ManagerViewConsoleImpl;
	ServiceView* service_view = new ServiceViewConsoleImpl;

	while(1)
	{
		show_menu();
		int choose;
		cin>>choose;
		switch(choose)
		{
			case 1:manager_view->menu();break;
			case 2:service_view->menu();break;
			case 0:return 0;
		}
		
	}
	delete []manager_view;
	delete []service_view;
}
